package com.amtf.datafile2;

import java.io.IOException;
import java.util.List;

public interface DataTable<DTD extends DataTableDefinition<DFD>, DFD extends DataFieldDefinition> {

	public void close();

	public String getName();

	public void setName(String name);

	public DTD getDefinition();

	public void setDefinition(DTD definition);

	public int currentReadingLine();

	public int currentWritenLine();

	// public int totalLineNumber() throws IOException, DataException;

	public DataRecord readFirstLine() throws IOException, DataException;

	public DataRecord readNextLine() throws IOException, DataException;

	public List<DataRecord> readFirstLines(int readCount) throws IOException, DataException;

	public List<DataRecord> readNextLines(int readCount) throws IOException, DataException;

	public void writeLine(String[] line) throws IOException, DataException;

	public void writeLine(Object[] line) throws IOException, DataException;

	public void writeLine(DataRecord line) throws IOException;

	public void writeLines(List<DataRecord> lines) throws IOException;

	public void writeAll(DataTable<?, ?> tableSet) throws IOException, DataException;
}
